package com.fusion.service;

import java.util.Date;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class ThreadServiceImple {

	@Async
	@SuppressWarnings("deprecation")
	public void test() {
		while (true) {
			String name = Thread.currentThread().getName();
			System.out.println(name + " : " + new Date().toLocaleString());
			try {
				Thread.sleep(5000);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}

}
